/****************************************************************************

Force Engine v0.5

Creado: 28/03/08
Clase: XMeshImporter.h
Hecho by: German Battiston AKA Melkor

****************************************************************************/

//---------------------------------------------------------------------------
#ifndef XMESHIMPORTER_H
#define XMESHIMPORTER_H
//---------------------------------------------------------------------------
#include <d3dx9.h>
#include <D3dx9mesh.h>
#include "../Graphics/Texture.h"
//---------------------------------------------------------------------------
class Mesh;
class Node;
class Graphics;
class SceneGraph;
struct stXFrame;
class stXFile;
//---------------------------------------------------------------------------
class FORCEENGINE_API XMeshImporter
{

public:

	XMeshImporter(Graphics &rkGraphics);
	~XMeshImporter();

	bool LoadMeshFromX( std::string szFileName, 
						Mesh &rkMesh, 
						LPDIRECT3DDEVICE9 pD3DDevice );

	bool LoadHierarchyFromX(const char * szFileName, SceneGraph * pkSceneGraph);

private:
	
	Graphics * m_pkGraphics;
	bool TranslateXFileToSceneGraph(stXFrame * pkParentFrame,
									Node * pkParentNode, 
									stXFile * pkXFile, 
									SceneGraph * pkSceneGraph);
};

//---------------------------------------------------------------------------

#endif /*--- XMESHIMPORTER_H ---*/

//---------------------------------------------------------------------------